package pattern;

import org.w3c.dom.*;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test {

    public static void main(String[] args) {

        BigDecimal bigDecimal = new BigDecimal("5000");
        BigDecimal divide = bigDecimal.divide(new BigDecimal("30"), 8, BigDecimal.ROUND_HALF_UP);
        BigDecimal divisor = new BigDecimal("1000");
        BigDecimal healthRadio = divide.divide(divisor, 8, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("40"));

        System.out.println(healthRadio.toPlainString());

        System.out.println(new Date(2021 - 1900, 4, 1).toLocaleString());

        String year = "2021-04";
        System.out.println(year.compareTo("2021-11"));

        System.out.println(LocalDate.now().getYear());


        String test = "[批复用气总量1_aaa]你好呀，[批复用气总量2_a222]你好呀，[批复用气总量_]你好呀，[批复用气总量_]你好呀，[批复用气总量_3333]";
        test = test.replaceAll("^\\[[\\S\\s]*_$", "\\${");

        //test = test.replaceAll("]","}");

        System.out.println(test);

        String value = "你a1b2cc哈哈,dd";
        value = value.replaceAll("[^A-Za-z0-9]", "*");
        System.out.println(value);

    }
}
